package ysansi

import "fmt"

const (
	ClearScreen  = "\033[2J"
	ClearOneLine = "\033[2K"
	NextLine     = "\033[E"
	PreLine      = "\033[F"
)

func DoClearScreen() {
	fmt.Print(ClearScreen)
}

func DoClearOneLine() {
	fmt.Print(ClearOneLine)
}

func ToNextLine() {
	fmt.Print(NextLine)
}

func ToPreLine() {
	fmt.Print(PreLine)
}

func DoClearPreLines(n int) {
	for i := 0; i < n; i++ {
		ToPreLine()
		DoClearOneLine()
	}
}
